﻿ IF EXISTS (SELECT * FROM sysobjects WHERE type = 'P' AND name = 'P_UpdateUserCredentials')
	BEGIN
		DROP  Procedure  [esf_sso].P_UpdateUserCredentials
	END

GO

CREATE Procedure [esf_sso].P_UpdateUserCredentials
	@pPersonID				BIGINT
   ,@pAlias					VARCHAR (20)
   ,@pPassword				VARCHAR (160)
   ,@pLastUpdateDateTime	DATETIME
   ,@pUserLastUpdateAlias	VARCHAR (20)
AS
	UPDATE [esf_sso].[User]
	SET [Alias] = @pAlias
	   ,[Password] = @pPassword
	   ,[LastUpdateDateTime] = @pLastUpdateDateTime
	   ,[UserLastUpdateAlias] = @pUserLastUpdateAlias
	WHERE
		[PersonID] = @pPersonID
GO